﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<%
    if (Request.IsAuthenticated) {
%>
    Welcome
       <%
       if (Page.User.IsInRole("admin")){
       %>
         <b><%: Page.User.Identity.Name %></b>!
       <%
        }
        else{
       %>   
        <asp:HyperLink ID="HypName" runat="server" NavigateUrl="~/WebForms/Account/CustomerEdit.aspx"><%: Page.User.Identity.Name %></asp:HyperLink>!
          <% }%>

        <asp:HyperLink ID="hypHome" runat="server" NavigateUrl="<%$RouteUrl:routename=default,controller=Account,action=LogOff%>">Log Off</asp:HyperLink>
        |
        <asp:HyperLink ID="HypChangePwd" runat="server" NavigateUrl="<%$RouteUrl:routename=default,controller=Account,action=ChangePassword%>">Change Password</asp:HyperLink>
<%
    }
    else {
%> 
        <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="<%$RouteUrl:routename=default,controller=Account,action=LogOn%>">Log On</asp:HyperLink>
        |
        <asp:HyperLink ID="HypRegister" runat="server" NavigateUrl="<%$RouteUrl:routename=default,controller=Account,action=Register%>">Register</asp:HyperLink>
<%
    }
%>

